import request from '@/utils/request'

// export function uploadImg(data) {
//   return request({
//     url: '/imgInfo/upload',
//     method: 'post',
//     headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
//     data: data
//   })
// }


export function uploadImg(data) {
  return request({
    url: '/imgInfo/upload',
    method: 'post',
    headers: { "Content-Type": "multipart/form-data;charset=UTF-8"},
    data: data
  })
}

export function getPage(data) {
  return request({
    url: '/imgInfo/page',
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    method: 'post',
    data: data
  })
}

export function getSimilarImages(data) {
  return request({
    url: '/imgInfo/getSimilarImages',
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    method: 'post',
    data: data
  })
}

export function startFindSimilarImages(data) {
  return request({
    url: '/imgInfo/startFindSimilarImages',
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    method: 'post',
    data: data
  })
}


export function getNotExistsRecords(data) {
  return request({
    url: '/imgInfo/getNotExistsRecords',
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    method: 'post',
    data: data
  })
}

export function deleteByIds(id){
  return request({
    url: '/imgInfo/deleteByIds?ids='+id,
    method: 'post',
  })
}

export function updateImage(data){
  return request({
    url: '/imgInfo/update',
    method: 'post',
    data: data
  })
}






